# client.py
import socket

client = socket.socket()
host = socket.gethostname()
client.connect((host, 8999))
while True:
    message = input("Please input your message:")
    client.send(bytes(message, encoding="utf-8"))
    content = client.recv(1024)
    reply = str(content, encoding="utf-8")
    print(reply)
    if message == " ":
        break
client.close()
